from django.conf.urls.defaults import *
from codemonkeys import *

urlpatterns = patterns('',
    (r'^publicode/$', 'codemonkeys.codescratches.views.index'),
    (r'^publicode/view/(?P<scratch_id>\w+)/$', 'codemonkeys.codescratches.views.details'),
    (r'^publicode/(?P<scratch_id>\d+)/$', 'codemonkeys.codescratches.views.details'),
    (r'^publicode/html/(?P<scratch_id>\w+)/$', 'codemonkeys.codescratches.views.exportAsHTML'),
    (r'^publicode/txt/(?P<scratch_id>\w+)/$', 'codemonkeys.codescratches.views.exportAsTXT'),
    (r'^$', 'codemonkeys.codescratches.views.codemonkeys_index'),
    

    (r'^publicode/add/$', 'codemonkeys.codescratches.views.addScratch'),
    (r'^i/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    (r'^admin/', include('django.contrib.admin.urls')),
)
